﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Nathan_tools
{
    public partial class time_tools : Form
    {
        public time_tools()
        {
            InitializeComponent();
        }

        private void btn_countdays_Click(object sender, EventArgs e)
        {
            //DateTime pre_Date = new DateTime(textBox1.Text);
            TimeSpan timespan=Convert .ToDateTime (textBox2 .Text ).Subtract ( Convert .ToDateTime (textBox1 .Text ));
            lb_days .Text =timespan .Days.ToString ();
        }

        private void time_tools_Load(object sender, EventArgs e)
        {
            textBox2.Text = DateTime.Now.ToShortDateString();
        }
    }
}
